!These programs are to be run on one 9010A which is plugged into the 
!9010A under test (UUT) via the Z80AA (faster) pod.
PROGRAM 1


PROGRAM 7
   
   READ PROBE
   WRITE @ 100E3 = AA
   READ @ 100E2
   READ @ 100E1
   READ PROBE
   REG1 = REG0 AND 7000000
   REG2 = REGA AND FFFF00
   REG3 = REGA AND 7F
   IF REG1 = REGA GOTO A
   IF REG2 = REGA GOTO A
   IF REG3 = REGA GOTO A
   REGA = 0
   GOTO B
A: LABEL A
   REGA = 1
   GOTO B
B: LABEL B
   IF REGB = 1 GOTO C
   IF REGB = 2 GOTO D
   IF REGB = 3 GOTO E
C: LABEL C
   DPY-U1-23
   GOTO F
D: LABEL D
   DPY-U1-4
   GOTO F
E: LABEL E
   DPY-U1-18
F: LABEL F

PROGRAM 8

   DPY-RS-232 TEST#
   EXECUTE PROGRAM 12
   DPY-JUMP R14//C16 TO TP12 - GROUND
   DPY-+2-CONT#
   STOP
   DPY-#SET PARITY ON, ODD; CONT
   STOP
   DPY-#SET 8 BITS, 1 STOP BIT;
   DPY-+ CONT
   STOP
   DPY-#SET BAUD RATE = 9600, CONT
   STOP
   DPY-JUMPER RS232 PIN 2 TO 3#, 
   DPY-+CONT
   STOP
   DPY-#MASTER CLEAR TEST
   EXECUTE PROGRAM 12
   REG4 = 7000000
   SYNC FREE-RUN
   DPY-POWER OFF UUT, PROBE U1-21
   DPY-+CONT
   STOP
   READ PROBE
   DPY-POWER ON UUT, CONT#
   STOP
   READ PROBE
   IF REG4 > REG0 AND REG4 GOTO D
0: LABEL 0
   DPY-XMIT BUFFER STATUS TEST#
   EXECUTE PROGRAM 13
   READ @ 100E2
   IF REGE AND 10 = 10 GOTO 1
   DPY-XMIT BUFFER FULL
   GOTO E
1: LABEL 1
   DPY-DATA RECV'D STATUS TEST#
   EXECUTE PROGRAM 13
   READ @ 100E1
   READ @ 100E2
   IF REGE AND 8 = 0 GOTO 2
   DPY-DATA RECV'D-NONE SENT-
   GOTO E
2: LABEL 2
   DPY-OVERRUN STATUS TEST#
   EXECUTE PROGRAM 13
   REGB = 10
   REG1 = 55
   EXECUTE PROGRAM 16
   WRITE @ 100E3 = REG1
   EXECUTE PROGRAM 16
   WRITE @ 100E3 = REG1
   EXECUTE PROGRAM 12
   READ @ 100E2
   IF REGE AND 4 = 4 GOTO 3
   DPY-OVERRUN STATUS
   GOTO E
3: LABEL 3
   DPY-DATA XMIT//REC'D TEST#
   EXECUTE PROGRAM 13
   READ @ 100E1
   IF REGE = REG1 GOTO 4
   GOTO C
4: LABEL 4
   REG1 = AA
   REGB = 10
   EXECUTE PROGRAM 16
   WRITE @ 100E3 = REG1
   EXECUTE PROGRAM 12
   READ @ 100E1
   IF REGE = REG1 GOTO F
   GOTO C
5: LABEL 5
   SYNC FREE-RUN
   DPY-PROBE U1-1,34,37-HIGH?0
   IF REG0 = 0 GOTO E
   DPY-PROBE U1-3,16-ALL LOW?0
   IF REG0 = 0 GOTO E
   DPY-#UART CONTROL TEST
   EXECUTE PROGRAM 12
   SYNC ADDRESS
   REGB = 1
   DPY-@PROBE U1-23 - CONT
   STOP
   REGA = 300
   EXECUTE PROGRAM 7
   IF REGA = 0 GOTO E
   REGB = 2
   DPY-#PROBE U1-4 - CONT
   STOP
   REGA = 600
   EXECUTE PROGRAM 7
   IF REGA = 0 GOTO E
   REGB = 3
   DPY-#PROBE U1-18 - CONT
   STOP
   REGA = 600
   EXECUTE PROGRAM 7
   IF REGA = 0 GOTO E
   DPY-#UART TRANSMIT TEST
   EXECUTE PROGRAM 12
   DPY-PROBE U1-25 - CONT
   STOP
   REGA = 4
   EXECUTE PROGRAM 7
   IF REGA = 0 GOTO 6
   GOTO A
6: LABEL 6
   DPY-#U1-25 TRANSMIT ERROR - CON
   DPY-+T
   STOP
   GOTO F
A: LABEL A
   SYNC FREE-RUN
   DPY-#BAD ITEM NOT FOUND
   EXECUTE PROGRAM 13
   DPY-#USE A SCOPE TO CHECK INPUT
   DPY-+ AND
   EXECUTE PROGRAM 13
   DPY-#OUTPUT OPTO ISOLATORS.
   EXECUTE PROGRAM 13
   DPY-A 55 IS BEING SENT CONTINUO
   DPY-+SLY#
   EXECUTE PROGRAM 13
   REG0 = 40
   DPY-#HIT CLEAR//NO TO END TEST
   DPY-+%0
B: LABEL B
   IF REG0 = 1D GOTO F
   WRITE @ 100E3 = 55
   GOTO B
C: DPY-DATA ERROR-SENT $1-REC'D $E
   DPY-+-CONT#
   STOP
   GOTO 5
E: LABEL E
   DPY-+ERROR-CONT#
   STOP
   GOTO 5
D: LABEL D
   DPY-#BAD MASTER CLEAR, CONT
   STOP
   GOTO F
F: LABEL F
   DPY-#END RS-232-C TEST
   
PROGRAM 12
   REG1 = 40
1: LABEL 1
   DEC REG1
   IF REG1 > 0 GOTO 1

PROGRAM 13

   EXECUTE PROGRAM 12
   EXECUTE PROGRAM 12
   EXECUTE PROGRAM 12

PROGRAM 16

0: LABEL 0
   READ @ 100E2
   IF REGE AND REGB = REGB GOTO F
   GOTO 0

F: LABEL F

